/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.report.customer;

import java.io.IOException;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JREmptyDataSource;
import net.sf.jasperreports.engine.JRException;
import src.report.AbstractBaseReportBean;
import src.view.system.CompanyBean;

/**
 *
 * @author Yusup Jauhari Shandi <in.visi>
 */
@ManagedBean
@RequestScoped
public class RptDataPerRekeningBean extends AbstractBaseReportBean{
     private final String COMPILE_FILE_NAME = "customer/rptDataPerRekening";
    @Override
    protected JRDataSource getJRDataSource() {
       return new JREmptyDataSource();// throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected String getCompileFileName() {
        return COMPILE_FILE_NAME; 
    }
    
    
    public String execute(Integer id) {
		try {
                       super.getReportParameters().put("p_id_nasabah", id);
                       super.getReportParameters().put("p_company", new CompanyBean().loadCompanyInfo().toString());
			super.prepareReportViaConn();
		} catch (JRException | IOException e) {
			// make your own exception handling
		}
		
		return null;
	}
    
}
